SDK - Textures and shaders
Return to the SDK's Welcome page Crashday's textures are usually consisting of two files. The bitmap file (.dds or .tga) and the material shader file (.tex). If no shader file is available, a diffuse non-alpha default material will be used. However, to give any of your textures the right look, make sure you create .tex-files for each new texture. Textures and their related .tex-files have to have the same filename and must exist in the same directory. All Crashday textures are and should be located in content\textures. *Due to graphics card limitations, Crashday (like any other realtime application) only supports dimensions of 16x16, 32x128, 1024x1024, etc. (potence with basis 2) *The maximum valid texture resolution is 2048x2048. Beware that not all graphics cards might support these high resolutions. Moreover this high resolution occupies 16MB of memory in the uncompressed version .tga textures in Crashday Crashday primarily uses the .tga-format for car textures. However, you can of course use it for any other purpose, too. As it is a non-compressed format, it uses a lot of video video memory. If possible, always use compressed .dds textures instead (see below). Find some .tga particularities here: *mipmaps for .tga-files are created from Crashday at runtime *.tga supports an alpha channel. Be sure to have it turned on when saving .tga with your graphics application *it needs no related medium and lowres version in the “medium_detail_textures” and ”low_detail_textures” folders as there are created from Crashday at runtime *be sure to use .tga format when creating car textures as .dds isn't capable of any in-game color changing .dds textures in Crashday In Crashday the .dds format is usually used for texturing objects like track pieces. As .dds is a compressed texture format, it offers a very small file size but has some limitations: *it has to contain its own precalculated mipmaps, so be sure they are generated when exporting to .dds with your graphics application *.dds supports an alpha channel. Be sure to have it turned on when saving .dds with your graphics application *it needs a related medium (half-size) and lowres (quarter-size) version in the subfolders “medium_detail_textures” and ”low_detail_textures” *Crashday tries to desaturate every texture in-game, as the gamma ramp screen filter increases color intensity too much. As post-processing isn't supported by compressed .dds textures, you need to do it manually with your graphics application. Best way to do this is simply apply a 50% grey-scale layer on top of your texture. Explanation of Crashday's .tex-shading files A texture shader info file defines the way how a certain texture is being shaded in Crashday (i.e. lighting and rendering). Also it defines the physical material a texture is of. The file is an ASCII .tex-file associated to a texture with the same name and the extension .dds/.tga in one of the texture folders. The following list explains the shading file in detail: Crashday only works with a set of predefined shaders, which can partly be modified by the values below the shader type in the shader file. The supported types with their parameters are: Category:SDK